package com.hwhhhh.graduationproject.service;

import com.hwhhhh.graduationproject.domain.model.FreeClassroom;
import com.hwhhhh.graduationproject.exception.NoFreeClassroomException;

import java.sql.Date;
import java.util.List;
import java.util.Map;

/**
 * @Description detail
 * Created by Hwhhhh on 2021/3/2 15:13
 */
public interface ClassroomService {
    List<FreeClassroom> getFreeClassroomsByFreeType(int freeType) throws NoFreeClassroomException;

    Map<Integer, String> findByClassroomNumLike(String key) throws NoFreeClassroomException;

    FreeClassroom getById(int id);

    /**
     * 根据op进行加减操作
     * @param id
     * @param op 1为加，0为减
     */
    void updateOccupyNum(int id, int op);

    void makeAppointment(int freeClassroomId, int uid);

    void cancelAppointment(int id);
}
